<template>
  <div>
    <!--面包屑-->
    <el-breadcrumb separator="/">
      <el-breadcrumb-item v-for="item in breadcrumbList" :key=item.path>
        {{ item.meta.title }}
      </el-breadcrumb-item>
    </el-breadcrumb>
  </div>
</template>
<script>
export default {
  data() {
    return {
      breadcrumbList:{}
    }
  },
  created() {
    console.log(this.$route.matched)
    this.breadcrumbList = this.$route.matched
  },
  watch: {
    $route(to,from) {
      console.log(to)
      this.breadcrumbList = to.matched
    },
  },
};
</script>

<style scoped>
.el-breadcrumb {
  padding-bottom: 10px;
}
</style>
